Skip to content

MPT-19902: add /integration/extensions/{id}/installations service#282

Merged
albertsola merged 1 commit into
mainfrom
MPT-19902/integration-extension-installations
May 11, 2026
Merged

MPT-19902: add /integration/extensions/{id}/installations service#282
albertsola merged 1 commit into
mainfrom
MPT-19902/integration-extension-installations

Conversation

@albertsola
Copy link
Copy Markdown
Contributor

@albertsola albertsola commented Apr 7, 2026

Summary

Implements the /public/v1/integration/extensions/{extensionId}/installations endpoint group as part of MPT-13310.

Changes

  • mpt_api_client/resources/integration/extension_installations.py — read-only service (GetMixin + CollectionMixin)
  • Updated extensions.py to expose installations(extension_id) accessor
  • Unit tests: tests/unit/resources/integration/test_extension_installations.py
  • E2e tests: tests/e2e/integration/extension_installations/

Depends on

#277 (MPT-19892 — rename extensibility → integration)

⚠️ Draft — targets MPT-19892/e2e-extension-base-service until PR #277 merges.

Closes MPT-19902

  • Added new ExtensionInstallation model and ExtensionInstallationsService (both sync and async variants) for the /public/v1/integration/extensions/{extension_id}/installations endpoint
  • Implemented installations(extension_id) accessor method on ExtensionsService and AsyncExtensionsService to provide fluent access to extension installations endpoints
  • Added comprehensive unit test coverage in tests/unit/resources/integration/test_extension_installations.py including model validation, mixin verification, HTTP mocking, and accessor method testing
  • Added end-to-end test coverage in tests/e2e/integration/extension_installations/ for both synchronous and asynchronous workflows with filtering and direct retrieval scenarios
  • Updated pyproject.toml to include flake8 configuration for the new integration extension installations module
  • Updated test configuration in e2e_config.test.json with new installation ID reference

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 13e32850-0637-440b-92d0-b16cefd72aba

📥 Commits

Reviewing files that changed from the base of the PR and between 6eb48b9 and 89b1739.

📒 Files selected for processing (9)
  • e2e_config.test.json
  • mpt_api_client/resources/integration/extension_installations.py
  • mpt_api_client/resources/integration/extensions.py
  • pyproject.toml
  • tests/e2e/integration/extension_installations/__init__.py
  • tests/e2e/integration/extension_installations/conftest.py
  • tests/e2e/integration/extension_installations/test_async_extension_installations.py
  • tests/e2e/integration/extension_installations/test_sync_extension_installations.py
  • tests/unit/resources/integration/test_extension_installations.py

📝 Walkthrough

Walkthrough

This pull request adds support for extension installations as a sub-resource of extensions in the MPT API Python client. It introduces the ExtensionInstallation data model and service classes for both sync and async operations, wires them into the extensions service via new accessor methods, and validates with comprehensive unit and e2e tests.

Changes

Extension Installations Resource and Service Integration

Layer / File(s) Summary
Data Model & Service Config
mpt_api_client/resources/integration/extension_installations.py
ExtensionInstallation model with typed fields for identity, relationships, status, and configuration; ExtensionInstallationsServiceConfig binds the model to the /public/v1/integration/extensions/{extension_id}/installations endpoint with collection key data.
Sync and Async Service Clients
mpt_api_client/resources/integration/extension_installations.py
ExtensionInstallationsService and AsyncExtensionInstallationsService compose mixins (GetMixin/CollectionMixin and async equivalents) to provide get() and iterate() methods.
Extension Service Integration
mpt_api_client/resources/integration/extensions.py
ExtensionsService.installations(extension_id) and AsyncExtensionsService.installations(extension_id) methods return configured installation service clients with extension_id passed as endpoint parameter.
Unit Tests: Service and Model Fixtures
tests/unit/resources/integration/test_extension_installations.py
Imports and fixtures establish test service clients scoped to EXT-001 and test data; parametrized tests verify that sync/async services expose get and iterate methods and compute correct endpoint paths.
Unit Tests: Model Field Validation
tests/unit/resources/integration/test_extension_installations.py
Fixture installation_data provides representative installation fields; tests validate primitive fields, nested model mapping, and optional field behavior via direct instantiation.
Unit Tests: HTTP Behavior
tests/unit/resources/integration/test_extension_installations.py
Mocked HTTP tests verify iterate() and get() correctly construct requests and parse responses into ExtensionInstallation instances using respx stubs.
Unit Tests: Extension Service Accessor
tests/unit/resources/integration/test_extension_installations.py
Validates that extensions_service.installations("EXT-001") returns the correct service type with propagated http_client and endpoint_params for both sync and async variants.
E2E Test Fixtures and Configuration
tests/e2e/integration/extension_installations/conftest.py
Pytest fixtures read extension_id and installation_id from e2e_config; service fixtures instantiate sync/async installation clients via mpt_ops.integration.extensions.installations(extension_id).
E2E Sync and Async Tests
tests/e2e/integration/extension_installations/test_sync_extension_installations.py, tests/e2e/integration/extension_installations/test_async_extension_installations.py
Marked as flaky; sync and async tests verify filtering via helper assertion and fetching by installation_id with id validation.
Configuration Updates
pyproject.toml, e2e_config.test.json
Flake8 per-file-ignores reordered for mpt_api_client/resources/integration/*.py; e2e config updated with new installation identifier.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Jira Issue Key In Title ✅ Passed PR title contains exactly one Jira issue key in the format MPT-XXXX: MPT-19902
Test Coverage Required ✅ Passed PR modifies 2 code files and includes 4 test files. Test coverage is present for code changes.
Single Commit Required ✅ Passed The PR contains exactly 1 commit (89b1739). All changes are properly consolidated into a single commit with a clear commit message.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Base automatically changed from MPT-19892/e2e-extension-base-service to main April 7, 2026 12:00
@albertsola albertsola force-pushed the MPT-19902/integration-extension-installations branch from 3d04872 to df3a4e9 Compare April 7, 2026 12:04
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

@albertsola albertsola force-pushed the MPT-19902/integration-extension-installations branch 6 times, most recently from c947d41 to e94734b Compare May 11, 2026 09:00
@albertsola albertsola marked this pull request as ready for review May 11, 2026 09:03
@albertsola albertsola requested a review from a team as a code owner May 11, 2026 09:03
@albertsola albertsola requested review from alephsur and svazquezco May 11, 2026 09:03
@albertsola albertsola force-pushed the MPT-19902/integration-extension-installations branch from e94734b to 89b1739 Compare May 11, 2026 09:05
@sonarqubecloud
Copy link
Copy Markdown

@albertsola albertsola merged commit c61b7b9 into main May 11, 2026
4 checks passed
@albertsola albertsola deleted the MPT-19902/integration-extension-installations branch May 11, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants